<html>
<head><meta charset="utf-8"><title>performance tooling ideas · turbowish · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/index.html">turbowish</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html">performance tooling ideas</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236235304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236235304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236235304">(Apr 26 2021 at 20:09)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="116883">@tmandry</span> , lets maybe talk in this topic about the ideas you’ve had in the performance tool space.</p>



<a name="236249221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236249221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236249221">(Apr 26 2021 at 21:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> most of my ideas have been around integration with debuggers, which can also be useful for performance tooling</p>



<a name="236249335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236249335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236249335">(Apr 26 2021 at 21:39)</a>:</h4>
<p>basically it boils down to 1) making actual stack traces nicer and 2) producing "stack traces" for tasks at rest</p>



<a name="236249448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236249448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236249448">(Apr 26 2021 at 21:40)</a>:</h4>
<p>(the latter is really a tree in the general case, not a stack)</p>



<a name="236249635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236249635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236249635">(Apr 26 2021 at 21:42)</a>:</h4>
<p>I think you can get quite far with some kind of api for getting a list of tasks (depending on the tool, this may be fine as a dynamic function call, or might need to be statically determinable by only inspecting the memory of a process.. that's harder)</p>



<a name="236249669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236249669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236249669">(Apr 26 2021 at 21:42)</a>:</h4>
<p>and a convention for how we emit debuginfo for generators</p>



<a name="236249744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236249744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236249744">(Apr 26 2021 at 21:43)</a>:</h4>
<p>e.g. I was going to set the source span for every generator variant type to the await point that it corresponds to</p>



<a name="236249872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236249872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236249872">(Apr 26 2021 at 21:44)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116883">tmandry</span> <a href="#narrow/stream/284843-turbowish/topic/performance.20tooling.20ideas/near/236249635">said</a>:</p>
<blockquote>
<p>I think you can get quite far with some kind of api for getting a list of tasks (depending on the tool, this may be fine as a dynamic function call, or might need to be statically determinable by only inspecting the memory of a process.. that's harder)</p>
</blockquote>
<p>I've gotten an ask for this api from a few different people at MS because they want to inspect tasks at rest and it's really, really hard right now especially on Windows.</p>



<a name="236250055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236250055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236250055">(Apr 26 2021 at 21:46)</a>:</h4>
<p>and by traversing type debuginfo recursively and looking for generators you can build up your "stack" or tree (it's not yet clear to me how you'd present a tree in a UI). intermediate types like combinators would be presented differently, that might require some heuristics or other changes.</p>



<a name="236250188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236250188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236250188">(Apr 26 2021 at 21:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span>  I don't know if you've seen this already but VS has some nice UI around async tasks (for supported languages) <br>
<a href="https://devblogs.microsoft.com/visualstudio/how-do-i-debug-async-code-in-visual-studio/#is-there-a-way-to-better-visualize-tasks-and-async-code-flow">https://devblogs.microsoft.com/visualstudio/how-do-i-debug-async-code-in-visual-studio/#is-there-a-way-to-better-visualize-tasks-and-async-code-flow</a></p>



<a name="236250210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236250210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236250210">(Apr 26 2021 at 21:47)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125250">Wesley Wiser</span> <a href="#narrow/stream/284843-turbowish/topic/performance.20tooling.20ideas/near/236249872">said</a>:</p>
<blockquote>
<p>I've gotten an ask for this api from a few different people at MS because they want to inspect tasks at rest and it's really, really hard right now especially on Windows.</p>
</blockquote>
<p>yeah, it's also hard on Fuchsia. I literally wrote an internal doc explaining how to use llvm-dwarfdump and a debugger to manually crawl the task structure, and that's assuming you can get a pointer to it in the first place</p>



<a name="236250237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236250237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236250237">(Apr 26 2021 at 21:47)</a>:</h4>
<p>oof</p>



<a name="236250369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236250369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236250369">(Apr 26 2021 at 21:49)</a>:</h4>
<p>ah yeah, that VS example is essentially what I'm imagining</p>



<a name="236250502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236250502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236250502">(Apr 26 2021 at 21:50)</a>:</h4>
<p>the other thing I've had on my mind is task provenance, i.e. capturing a backtrace when a task is spawned in debug mode and being able to view that when inspecting the task.</p>



<a name="236250654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236250654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236250654">(Apr 26 2021 at 21:52)</a>:</h4>
<p>I don't know what options we have in terms of visualization in gdb or lldb but even having some kind of text report like</p>
<div class="codehilite"><pre><span></span><code>Task 1 is waiting on Task 2
Task 2 is waiting on Task 3
Task 3 is waiting on Task 1

Task 1 stack:
...

Task 2 stack:
...

Task 3 stack:
...
</code></pre></div>
<p>would be significantly better than the status quo</p>



<a name="236251104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236251104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236251104">(Apr 26 2021 at 21:56)</a>:</h4>
<p>This seems like it'd need a combination of runtime buy-in and language support. Runtime is the only thing that knows tasks at rest. language support would be necessary to inspect state of a <code>Future</code>.</p>



<a name="236251324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236251324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236251324">(Apr 26 2021 at 21:58)</a>:</h4>
<p>/me wonders how likely is it that async on Windows is based on fibers.</p>



<a name="236260730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236260730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236260730">(Apr 26 2021 at 23:30)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> for inspecting <code>Future</code> types I think we can get pretty far by only generating special debuginfo for generators, and doing a full traversal of all types embedded in a task to look for generators nested in them (though this might be too slow in practice)</p>



<a name="236260837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236260837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236260837">(Apr 26 2021 at 23:31)</a>:</h4>
<p>it would be very nice to see at a glance that a task is blocked on fd 6 or something, but you can infer the state of things by looking at the backtrace created from the generator debuginfo (i.e. which await points are active)</p>



<a name="236368325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236368325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236368325">(Apr 27 2021 at 16:27)</a>:</h4>
<p>I agree that we will likely need some about of runtime buy-in and  <em>compiler</em> (hopefully <em>just</em> that, not language) support (in terms of getting debuginfo). This is partly why I was curious about whether we might look into generating CTF (or some extension of CTF …?)</p>



<a name="236368871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236368871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236368871">(Apr 27 2021 at 16:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116883">tmandry</span> <a href="#narrow/stream/284843-turbowish/topic/performance.20tooling.20ideas/near/236260730">said</a>:</p>
<blockquote>
<p>[…] and doing a full traversal of all types embedded in a task to look for generators nested in them (though this might be too slow in practice)</p>
</blockquote>
<p>Hmm, I was thinking/hoping that a more directed traversal would suffice. Why a full traversal of all types? Because of state hidden behind <code>dyn Trait</code>, I’m guessing?</p>



<a name="236444510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236444510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236444510">(Apr 28 2021 at 03:31)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> not just that, but because of combinators, you might have to go down more than one level to find the next generator</p>



<a name="236444536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236444536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236444536">(Apr 28 2021 at 03:31)</a>:</h4>
<p>but maybe we can surface some kind of "contains generator" bit in the debuginfo somehow</p>



<a name="236444547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236444547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236444547">(Apr 28 2021 at 03:31)</a>:</h4>
<p>and make it transitive</p>



<a name="236507452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236507452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236507452">(Apr 28 2021 at 13:35)</a>:</h4>
<p>I can believe we need to traverse more than one level. But I had still assumed that we could do a fair amount of pre-processing of the types to precompute what paths to traverse.</p>



<a name="236508101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236508101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236508101">(Apr 28 2021 at 13:39)</a>:</h4>
<p>but hey, putting extra bits in the debuginfo works for me too. :)</p>



<a name="236537311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236537311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Gilcher <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236537311">(Apr 28 2021 at 16:25)</a>:</h4>
<p>BTW, if dtrace and particularly CTF are a note easy to work with rust, <a href="https://github.com/knurling-rs/defmt">https://github.com/knurling-rs/defmt</a> is a compressed format for rust data structures that can be exposed over a socket</p>



<a name="236537426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236537426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Gilcher <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236537426">(Apr 28 2021 at 16:25)</a>:</h4>
<p>It's generally currently built for microcontrollers, but it allows reconstruction of data and e.g. log messages out side of the running system and knurling provides tools to attach.</p>



<a name="236537549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/236537549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Gilcher <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#236537549">(Apr 28 2021 at 16:26)</a>:</h4>
<p>(this is an approach similar to what many logshippers use nowadays, but without the intermediate step of compressing)</p>



<a name="237545061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237545061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237545061">(May 05 2021 at 18:37)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125250">Wesley Wiser</span> <a href="#narrow/stream/284843-turbowish/topic/performance.20tooling.20ideas/near/236249872">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116883">tmandry</span> <a href="#narrow/stream/284843-turbowish/topic/performance.20tooling.20ideas/near/236249635">said</a>:</p>
<blockquote>
<p>I think you can get quite far with some kind of api for getting a list of tasks (depending on the tool, this may be fine as a dynamic function call, or might need to be statically determinable by only inspecting the memory of a process.. that's harder)</p>
</blockquote>
<p>I've gotten an ask for this api from a few different people at MS because they want to inspect tasks at rest and it's really, really hard right now especially on Windows.</p>
</blockquote>
<p>For the people who want a list of tasks: Eliza (of <code>tracing</code> fame) has a prototype that does this, built atop tracing: <a href="https://github.com/tokio-rs/console">https://github.com/tokio-rs/console</a></p>



<a name="237545186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237545186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237545186">(May 05 2021 at 18:38)</a>:</h4>
<p>(I cannot say enough how excited I am about that. The README on the above repo includes an asciinema demo of the tool in action.)</p>



<a name="237545300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237545300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237545300">(May 05 2021 at 18:39)</a>:</h4>
<p>Discussion of the tool is ongoing within tokio’s discord, on their <a href="https://discord.gg/M4pXXFk9">#console channel</a></p>



<a name="237561669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237561669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237561669">(May 05 2021 at 20:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> do you have any thoughts/concerns about building something like this atop tracing? Or some other event bus? (I am under the impression that tracing itself may undergo an overhaul in the hopefully not too distant future.)</p>



<a name="237564064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564064">(May 05 2021 at 20:56)</a>:</h4>
<p>if it can be integrated into our executor then I think it could work</p>



<a name="237564206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564206">(May 05 2021 at 20:57)</a>:</h4>
<p><span class="user-mention" data-user-id="130111">@anp</span> has worked on integrating tracing into our diagnostics pipeline, though I don't think that work is complete</p>



<a name="237564342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564342">(May 05 2021 at 20:58)</a>:</h4>
<p>it works today! but it has a long way to go before we can use it to instrument everything</p>



<a name="237564457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564457">(May 05 2021 at 20:59)</a>:</h4>
<p><span class="user-mention" data-user-id="130111">@anp</span> is there a way to get the logs out in structured form?</p>



<a name="237564477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564477">(May 05 2021 at 20:59)</a>:</h4>
<p>its also not clear to me whether something like eliza's console should be driven by the existing tracing integration w/ our logging service (and thus support multiple processes at once) or whether it should hook up to individual processes</p>



<a name="237564506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564506">(May 05 2021 at 20:59)</a>:</h4>
<p>yeah if you use the ArchiveAccessor protocol you can get the structured values out in a json format</p>



<a name="237564555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564555">(May 05 2021 at 20:59)</a>:</h4>
<p>which also works for metrics trees, which i <em>think</em> be a better place to emit the current executor state</p>



<a name="237564575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564575">(May 05 2021 at 21:00)</a>:</h4>
<p>its a write-optimized shared memory thing</p>



<a name="237564856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237564856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237564856">(May 05 2021 at 21:00)</a>:</h4>
<p>yes, that kind of thing would definitely be better</p>



<a name="237565228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237565228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237565228">(May 05 2021 at 21:02)</a>:</h4>
<p>there's an overview here <a href="https://fuchsia.dev/fuchsia-src/development/diagnostics/inspect">https://fuchsia.dev/fuchsia-src/development/diagnostics/inspect</a></p>
<p>i think we might need to do some dependency surgery, iirc the inspect library for rust might depend on our executor atm</p>



<a name="237565425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237565425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237565425">(May 05 2021 at 21:02)</a>:</h4>
<p>but if we did this right, field crash reports could even include the current task queues for each service since the crash report snapshots all the shared memory metrics at once</p>



<a name="237565983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237565983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237565983">(May 05 2021 at 21:04)</a>:</h4>
<p>imo the ideal is to have the executor put all the tasks in metrics with identifiers that can be used as tracing spans</p>



<a name="237566089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566089">(May 05 2021 at 21:04)</a>:</h4>
<p>so when you have tracing events they can all be correlated back to the snapshot but you dont need to put every schedule/unschedule event into the logs at normal verbosities</p>



<a name="237566317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Carl Lerche <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566317">(May 05 2021 at 21:05)</a>:</h4>
<p><span class="user-mention" data-user-id="130111">@anp</span> looks like my work on valuable overlaps w/ your inspect?</p>



<a name="237566358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566358">(May 05 2021 at 21:05)</a>:</h4>
<p>that's another thing, part of console is a wire protocol based on gRPC for getting the data out, and we have our own infrastructure for that</p>



<a name="237566365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Carl Lerche <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566365">(May 05 2021 at 21:05)</a>:</h4>
<p>(valuable is the next iteration of tracing-core's record API)</p>



<a name="237566472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Carl Lerche <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566472">(May 05 2021 at 21:06)</a>:</h4>
<p><a href="http://github.com/carllerche/valuable">github.com/carllerche/valuable</a> very early still</p>



<a name="237566559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Carl Lerche <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566559">(May 05 2021 at 21:06)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> i think it is plausble for the console effort to eventually decouple the data model w/ the grpc aspect</p>



<a name="237566617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Carl Lerche <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566617">(May 05 2021 at 21:07)</a>:</h4>
<p>but, at this point, the goal is to get something working end to end</p>



<a name="237566883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566883">(May 05 2021 at 21:08)</a>:</h4>
<p>makes sense</p>



<a name="237566920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566920">(May 05 2021 at 21:08)</a>:</h4>
<p><span class="user-mention" data-user-id="224941">@Carl Lerche</span> say more? inspect is more of a platform protocol, if there were a rust metrics ecosystem like there is for tracing i think we might try to use it</p>



<a name="237566987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566987">(May 05 2021 at 21:08)</a>:</h4>
<p>the bindings as they are work pretty well and are fast but could stand to be better integrated w the ecosystem</p>



<a name="237566996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237566996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Carl Lerche <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237566996">(May 05 2021 at 21:08)</a>:</h4>
<p>ah, nvm, might not be related. valuable is a way to send structured data from the tracing instrumentation side to the collection side</p>



<a name="237567092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237567092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237567092">(May 05 2021 at 21:09)</a>:</h4>
<p>I'd love to be able to integrate with the data model and contribute to the tooling effort</p>



<a name="237567130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237567130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237567130">(May 05 2021 at 21:09)</a>:</h4>
<p>that sounds a bit like the structured log encoding and our ArchiveAccessor protocol maybe? those are the wire format and exil format basically</p>



<a name="237567207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237567207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Carl Lerche <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237567207">(May 05 2021 at 21:09)</a>:</h4>
<p>i'll hopefully have valuable to the point where I can write up <em>what</em> it is next week <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="237567233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237567233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237567233">(May 05 2021 at 21:09)</a>:</h4>
<p>this is the structured log message encoding <a href="https://fuchsia.dev/fuchsia-src/reference/diagnostics/logs/encoding">https://fuchsia.dev/fuchsia-src/reference/diagnostics/logs/encoding</a><br>
and this is the query api <a href="https://fuchsia.dev/fuchsia-src/reference/diagnostics/logs/access">https://fuchsia.dev/fuchsia-src/reference/diagnostics/logs/access</a></p>



<a name="237567245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/performance%20tooling%20ideas/near/237567245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> anp <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/performance.20tooling.20ideas.html#237567245">(May 05 2021 at 21:09)</a>:</h4>
<p>nice!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>